﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MOD;
using PermissionBase.Core.Domain;
using PermissionBase.Core.Service;

public partial class pages_Bullitin_CreateBullitin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    /// <summary>
    /// 保存事件处理
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void butSubmit_Click(object sender, EventArgs e)
    {

        string strTitle = txtTitle.Text;
        string strExpiryDate = Request.Form[txtExpiryDate.UniqueID];
        string strContent = txtContent.XMLNText;

        EBulletin eBulletin = new EBulletin();
        //此处应为当前登录人的CODE；
        Staff us = SessionUtil.GetLoginStaff();
        MOD.User user = new MOD.User();
        user.Emp_code = us.LoginId;
        int result = 0;
        result = eBulletin.CreateBulletin(user, "", strTitle, strContent,strExpiryDate);
        if (result > 0)
        {
            Response.Write("<script>alert('操作成功!');location='SearchBullitin.aspx';</script>");
        }
        else
        {
            CommonComponent.WebPage.JScript.JsAlert("操作失败!");
        }




    }


}
